<template>
  <div>
    <!-- 页面title -->
    <el-form ref="form" :rules="rules" label-position="right" :model="currentRow" label-suffix="："
             label-width="160px"
             style="box-shadow: 0 0 10px 10px rgb(0 0 0 / 3%)">
      <el-card style="padding: 20px">
        <el-tabs v-model="activeNameCard">
          <el-tab-pane label="基础档案" v-if="isLook" name="one">
            <div style="height: 75vh;">

              <div  v-if="isLook" class="dialogAdd">
                <el-tabs v-model="activeName1" type="border-card" class="dialogCard">
                  <el-tab-pane label="基本情况" name="base">
                    <form-base2 v-model="currentRow" ref="formBase2" :roadList2="roadList" :isEdit="isEdit"></form-base2>
                  </el-tab-pane>
                  <el-tab-pane label="坡体特征" name="type">
                    <form-type v-model="currentRow" ref="formType" :isLook="!isEdit"></form-type>
                  </el-tab-pane>
                  <el-tab-pane label="防护设施" name="survey">
                    <form-fang-hu v-model="currentRow" ref="formFangHu" :isLook="!isEdit"></form-fang-hu>
                  </el-tab-pane>
                  <el-tab-pane label="其他信息" name="risk">
                    <form-di-zhi v-model="currentRow" ref="formDizhi" :isLook="!isEdit"></form-di-zhi>
                  </el-tab-pane>
                  <el-tab-pane label="边坡照片" name="pic">
                    <el-row :gutter="10" v-if="!isEdit">
                      <el-col
                        :span="5"
                        v-for="(o, index) in currentRow.slopePicList"
                        :key="index">
                        <el-card :body-style="{ padding: '0px' }" style="color: #1990FE">
                          <el-image
                            @click="previewImg([o.url])"
                            style="height: 200px"
                            fit="scale-down"
                            :src="constUrl + o.url"></el-image>
                          <div style="padding: 14px">
                            <span>{{ o.name }}</span>
                            <div class="bottom clearfix">
                              <time class="time">{{ o.time | formatTimer }}</time>
                            </div>
                          </div>
                        </el-card>
                      </el-col>
                    </el-row>
                    <form-img
                      v-else
                      v-model="currentRow"
                      ref="formImg"
                    ></form-img>
                  </el-tab-pane>
                </el-tabs>
                <!-- 操作按钮 -->
                <picture-viewer ref="imageViewer1"></picture-viewer>
              </div>
            </div>
          </el-tab-pane>
          <el-tab-pane label="评定结果" name="first">
            <div style="height: 75vh;">
              <div v-if="!isLook" style="text-align: right">
              </div>
              <el-divider><span style="font-size: 25px;color: #1990FE">评定结果</span></el-divider>
              <el-row>
                <el-col :span="4">
                  <p><span class="label_view2">评估次序:</span><span class="info_view2">{{currentRow.count}}</span>
                  </p>
                </el-col>
                <el-col :span="6">
                  <p><span class="label_view2">评定等级:</span><span
                    class="info_view2">{{currentRow.techniqueTypeName}} <span
                    v-if="currentRow.techniqueTypeName !== '计算错误'">({{currentRow.score}}分)</span></span>
                  </p>
                </el-col>
                <el-col :span="14">
                  <p v-if="currentRow.singleControl"><span class="label_view2">单项控制指标:</span><span
                    class="info_view2">{{currentRow.singleControlName}}</span>
                  </p>
                  <p v-else><span class="label_view2">评定说明:</span><span class="info_view2">{{currentRow.remark}}</span>
                  </p>
                </el-col>
              </el-row>
              <el-divider><span style="font-size: 25px;color: #1990FE">基本信息</span></el-divider>
              <div v-if="isLook">
                <el-row :gutter="20">
                  <el-col :span="12">
                    <p><span class="label_view">边坡名称:</span><span class="info_view">{{currentRow.name}}</span>
                    </p>
                    <p><span class="label_view">边坡编号:</span><span class="info_view">{{currentRow.slopeNo}}</span>
                    </p>
                    <p><span class="label_view">路线:</span><span class="info_view">{{currentRow.roadCode}}{{currentRow.roadName}}</span>
                    </p>
                    <p><span class="label_view">管养单位:</span><span class="info_view">{{currentRow.deptName}}</span>
                    </p>
                  </el-col>
                  <el-col :span="12">
                    <p><span class="label_view">调查单位:</span><span
                      class="info_view">{{currentRow.investigationDeptTreeName}}</span></p>
                    <p><span class="label_view">调查人:</span><span class="info_view">{{currentRow.investigator}}</span>
                    </p>
                    <p><span class="label_view">调查时间:</span><span class="info_view">{{currentRow.investigationTime | formatTimer}}</span>
                    </p>
                  </el-col>
                </el-row>
              </div>
              <div v-else>
                <p style="color: red;font-weight: 600;text-align: center;margin-bottom: 10px">如需修改管养单位、路线、边坡三个选项，请联系管理员！</p>
                <el-form-item label="管养单位" prop="deptTreeId">
                  <organization
                    disabled
                    v-model="currentRow.deptTreeId"
                    placeholder="选择管养单位"
                    @change="changeDept"
                  ></organization>
                </el-form-item>
                <el-row>
                  <el-col :span="12">
                    <el-form-item label="路线" prop="roadId">
                      <el-select
                        disabled
                        :popper-append-to-body="false"
                        v-model="currentRow.roadId"
                        clearable
                        filterable
                        placeholder="选择路线"
                        @change="changeRoad">
                        <el-option
                          v-for="item in roadSelectList"
                          :key="item.id"
                          :label="item.name"
                          :value="item.id">
                        </el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="选择边坡" prop="slopeId">
                      <el-select
                        disabled
                        :popper-append-to-body="false"
                        v-model="currentRow.slopeId"
                        filterable
                        clearable
                        placeholder="选择边坡" @change="changeSlope">
                        <el-option
                          v-for="item in slopeSelectList"
                          :key="item.id"
                          :label="item.name"
                          :value="item.id">
                        </el-option>
                      </el-select>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row class="investigationBox">
                  <el-col :span="8">
                    <el-form-item label="调查单位" prop="investigationDeptTreeId">
                      <organization
                        v-model="currentRow.investigationDeptTreeId"
                        placeholder="选择调查单位"
                        @change="changeDept"
                      ></organization>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="调查时间" prop="investigationTime" class="investigationTwoBox">
                      <el-date-picker style="width: 200px"
                                      v-model="currentRow.investigationTime"
                                      type="date"
                                      placeholder="选择时间">
                      </el-date-picker>
                    </el-form-item>
                  </el-col>
                  <el-col :span="8">
                    <el-form-item label="调查人" prop="investigator">
                      <el-input v-model="currentRow.investigator" clearable
                                placeholder=""></el-input>
                    </el-form-item>
                  </el-col>
                </el-row>

              </div>
              <div v-if="currentRow.singleControl">
                <template v-if="isLook">
                  <el-alert
                    :closable="false" title="可点击查看大图" type="info" show-icon>
                  </el-alert>
                  <el-image
                    style="width: 200px; height: 200px;cursor: pointer;margin-left: 10px"
                    :key="img"
                    v-for="img in currentRow.singleControlPic"
                    :src="constUrl + img" @click="previewImg(currentRow.singleControlPic)"
                    fit="fill"></el-image>
                </template>
                <template v-else>
                  <el-form-item label="相关照片" prop="projectInfoImgList">
                    <upload-img v-model="currentRow.singleControlPic" :limit="6" :size-limit="6"
                                ref="uploadPic"></upload-img>
                  </el-form-item>
                </template>
              </div>
            </div>
          </el-tab-pane>
          <el-tab-pane label="排查信息" name="second" v-if="!currentRow.singleControl">
            <div>
              <el-divider><span style="font-size: 25px;color: #1990FE;margin-bottom: 20px">排查内容</span>
              </el-divider>
              <el-card class="paicha_view">
                <el-form-item style="width: 50%;margin-bottom: 2vw">
                            <span slot="label">

                              <i style="color:red;">*</i>
                             评定单元：</span>
                  <el-checkbox-group :disabled="isLook" size="small" :max="4" v-model="form.itemList"
                  >
                    <el-checkbox-button
                      v-for="option1 in formItemList"
                      :key="option1.code"
                      :label="option1.code"
                      :disabled="option1.code==1"
                    >{{ option1.name }}
                    </el-checkbox-button>
                  </el-checkbox-group>
                </el-form-item>

                <el-tabs v-model="activeName">
                  <el-tab-pane v-if="form.itemList.indexOf(1)>-1" label="(B)坡体" name="(B)坡体" accordion>
                       <span slot="label"><i v-if="form.bItem.highLight"  style="color:#ff5722" class="el-icon-s-opportunity"></i>(B)坡体</span>
                    <el-collapse v-model="collapseActiveName1" @change="(val)=>onChangeCollapse(val,1)" accordion>
                      <!--  (B1)坡体裂缝     -->
                      <el-collapse-item title="(B1)坡体裂缝" name="(B1)坡体裂缝">
                        <template slot="title">
                          <i  style="color:#ff5722"  v-if="form.bItem.b1Item.highLight"
                             class="el-icon-s-opportunity"></i>(B1)坡体裂缝
                        </template>
                        <div class="bItemBox">
                          <el-form-item style="width: 30%;">
                            <span slot="label">
<!--                               <el-popover-->
                              <!--                                 placement="top"-->
                              <!--                                 trigger="click">-->
                              <!--                                  <el-image :src="require(tips.img + '')"-->
                              <!--                                            fit="contain"></el-image>-->
                              <!--                              <i slot="reference" class="el-icon-question tips"-->
                              <!--                                 @click="showTips('(B1)坡体裂缝')"></i>-->
                              <!--                            </el-popover>-->
                  <el-popover
                    placement="top"
                    trigger="click">
                                  <el-image :src="require(tips.img + '')"
                                            fit="contain"></el-image>
                              <i slot="reference" class="el-icon-question tips"
                                 @click="showTips('(B1)坡体裂缝')"></i>
                            </el-popover>
                              <i style="color:red;">*</i>
                             标度</span>
                            <!-- select1==标度-->
                            <el-select
                              :disabled="isLook"
                              v-model="form.bItem.b1Item.value"
                              filterable
                              clearable
                              @change="form.bItem.b1Item.value!==1?form.bItem.b1Item.select1=2:form.bItem.b1Item.select1=1;$forceUpdate() " @focus="$forceUpdate()"
                            >
                              <el-option
                                v-for="item in EnumScoreList4"
                                :key="item.name"
                                :label="item.name"
                                :value="item.code">
                              </el-option>
                            </el-select>
                          </el-form-item>
                          <el-form-item style="width: 40%;">
                            <span slot="label">
                             是否发现坡体裂缝</span>
                            <!-- select2==是否发现坡体裂缝-->
                            <el-select
                              disabled
                              v-model="form.bItem.b1Item.select1"
                              filterable
                              clearable
                              @change="$forceUpdate() " @focus="$forceUpdate()"
                            >
                              <el-option
                                v-for="item in b1ItemSelect2"
                                :key="item.name"
                                :label="item.name"
                                :value="item.code">
                              </el-option>
                            </el-select>
                          </el-form-item>
                          <el-form-item style="width: 30%;" v-if="form.bItem.b1Item.select1==2">
                            <span slot="label">
                               裂缝数量</span>
                            <!-- select2==是否发现坡体裂缝-->
                            <!-- 裂缝数量 form.bItem.b1Item.input1-->
                            <el-input :disabled="isLook"
                                      size="mini"
                                      v-model.trim="form.bItem.b1Item.input1"
                                      type='number'
                                      style="width:70%">

                            </el-input>
                            （条）
                          </el-form-item>

                          <div class="list_view">
                            <el-button type="primary" class="btnWeiZhi"
                                       style="margin-top: 10px;width: 28%"
                                       @click="addList('B1添加位置')">新增详细调查记录
                            </el-button>
                            <table class="tableBox" v-if="form.bItem.b1Item.childList&&form.bItem.b1Item.childList.length!==0"
                                   style="width: 100%">
                              <tr>
                                <th width="50px">序号</th>
                                <th>
                                  位置
                                </th>
                                <th>
                                  尺寸描述
                                </th>
                                <th style=" width:250px">
                                  照片上传
                                </th>
                                <th>
                                  操作
                                </th>
                              </tr>
                              <tr v-for="(item,index) in form.bItem.b1Item.childList" :key="index">
                                <td>{{index+1}}</td>
                                <td style="width: 35%;">
                                  <el-radio-group :disabled="isLook" size="mini" v-model="item.select1"
                                                  @change="$forceUpdate() " @focus="$forceUpdate()">
                                    <el-radio-button
                                      label="1">
                                      边坡坡口外
                                    </el-radio-button>
                                    <el-radio-button
                                      label="2">
                                      坡脚
                                    </el-radio-button>
                                    <el-radio-button
                                      label="3">
                                      边坡坡面
                                    </el-radio-button>
                                  </el-radio-group>
                                  <div v-if="item.select1==3">
                                    <el-input :disabled="isLook"
                                              size="mini"
                                              v-model.trim="item.input1"
                                              type="number"
                                              @mousewheel.native.prevent
                                              @DOMMouseScroll.native.prevent
                                              style="width:80%;">
                                      <template slot="prepend">边坡坡面第</template>
                                      <template slot="append">级
                                      </template>
                                    </el-input>

                                  </div>
                                </td>
                                <td>
                                  <el-radio-group :disabled="isLook" size="mini" v-model="item.select2"
                                                  @change="$forceUpdate() " @focus="$forceUpdate()">
                                    <el-radio-button
                                      label="1">
                                      尺寸无法描述
                                    </el-radio-button>
                                    <el-radio-button
                                      label="2">
                                      尺寸
                                    </el-radio-button>
                                  </el-radio-group>
                                  <div v-if="item.select2==2" style="display: flex">
                                    <el-input :disabled="isLook"
                                              size="mini"
                                              v-model.trim="item.input2"
                                              type="number"
                                              @mousewheel.native.prevent
                                              @DOMMouseScroll.native.prevent
                                              style="width:33%;">
                                      <template slot="prepend">长</template>
                                      <template slot="append">（m）
                                      </template>
                                    </el-input>
                                    <el-input :disabled="isLook"
                                              size="mini"
                                              v-model.trim="item.input3"
                                              type="number"
                                              @mousewheel.native.prevent
                                              @DOMMouseScroll.native.prevent
                                              style="width:33%;">
                                      <template slot="prepend">宽</template>
                                      <template slot="append">（cm）
                                      </template>
                                    </el-input>
                                    <el-input :disabled="isLook"
                                              size="mini"
                                              v-model.trim="item.input4"
                                              type="number"
                                              @mousewheel.native.prevent
                                              @DOMMouseScroll.native.prevent
                                              style="width:33%;">
                                      <template slot="prepend">深</template>
                                      <template slot="append">（cm）
                                      </template>
                                    </el-input>
                                  </div>
                                </td>
                                <td>
                                  <div v-if="item.url.length!==0" class="picBox1">
                                    <el-button v-if="!isLook" type="danger" icon="el-icon-delete" circle
                                               @click="form.bItem.b1Item.childList[index].url.splice(0,1); $forceUpdate()"
                                               style="font-size:16px">
                                    </el-button>

                                    <el-image
                                      @click="_previewImg(0,item.url)"
                                      style="width: 180px;height: 50px"
                                      lazy
                                      fit="scale-down"
                                      :src="constUrl + item.url[0]"></el-image>
                                  </div>
                                  <upload-img
                                    v-else
                                    trigger="button"
                                    :size-limit="5"
                                    v-model="item.url"
                                    @update="setFormImg(item.url,index,'form.bItem.b1Item.childList')"
                                  ></upload-img>
                                </td>
                                <td>
                                  <el-button type="text"
                                             @click=" form.bItem.b1Item.childList.splice(index,1); $forceUpdate()"
                                             style="color: red">
                                    删除
                                  </el-button>
                                </td>
                              </tr>
                            </table>


                          </div>
                        </div>
                      </el-collapse-item>
                      <!--             (B2)坡体局部破坏   -->
                      <el-collapse-item title="(B2)坡体局部破坏" name="(B2)坡体局部破坏">
                        <template slot="title">
                          <i  style="color:#ff5722"  v-if="form.bItem.b2Item.highLight"
                              class="el-icon-s-opportunity"></i>(B2)坡体局部破坏
                        </template>
                        <div class="bItemBox">
                          <el-form-item>
                            <span slot="label">
<!--                               <el-popover-->
                              <!--                                 placement="top"-->
                              <!--                                 trigger="click">-->
                              <!--                                  <el-image :src="require(tips.img + '')"-->
                              <!--                                            fit="contain"></el-image>-->
                              <!--                              <i slot="reference" class="el-icon-question tips"-->
                              <!--                                 @click="showTips('(B1)坡体裂缝')"></i>-->
                              <!--                            </el-popover>-->
                                      <el-popover
                                        placement="top"
                                        trigger="click">
                                  <el-image :src="require(tips.img + '')"
                                            fit="contain"></el-image>
                              <i slot="reference" class="el-icon-question tips"
                                 @click="showTips('(B2)坡体局部破坏')"></i>
                            </el-popover>
                              <i style="color:red;">*</i>
                             标度</span>
                            <!-- select1==标度-->
                            <el-select
                              :disabled="isLook"
                              v-model="form.bItem.b2Item.value"
                              filterable
                              clearable
                              @change="form.bItem.b2Item.value!==1?form.bItem.b2Item.select1=2:form.bItem.b2Item.select1=1;$forceUpdate()" @focus="$forceUpdate()"
                            >
                              <el-option
                                v-for="item in EnumScoreList4"
                                :key="item.name"
                                :label="item.name"
                                :value="item.code">
                              </el-option>
                            </el-select>
                          </el-form-item>
                          <el-form-item>
                            <span slot="label">
                             是否发现坡体破坏</span>
                            <!-- select2==是否发现坡体破坏-->
                            <el-select
                              disabled
                              v-model="form.bItem.b2Item.select1"
                              filterable
                              clearable
                              @change="$forceUpdate() " @focus="$forceUpdate()"
                            >
                              <el-option
                                v-for="item in b2ItemSelect2"
                                :key="item.name"
                                :label="item.name"
                                :value="item.code">
                              </el-option>
                            </el-select>
                          </el-form-item>
                          <table  class="tableBox" v-if="form.bItem.b2Item.select1==2" style="width: 100%;">
                            <tr class="tableHeader">
                              <th>
                                坡体位置共计
                              </th>
                              <th>
                                最大局部破坏面积
                              </th>
                              <th>
                                累计坍塌面积
                              </th>
                            </tr>
                            <tr>
                              <td>
                                <el-input :disabled="isLook"
                                          size="mini"
                                          v-model.trim="form.bItem.b2Item.input1"
                                          type="number"
                                          style="width:50%">

                                </el-input>
                                处
                              </td>
                              <td>
                                <el-input :disabled="isLook"
                                          size="mini"
                                          v-model.trim="form.bItem.b2Item.input2"
                                          type="number"
                                          style="width:70%">

                                </el-input>
                                m²
                              </td>
                              <td>
                                <el-input :disabled="isLook"
                                          size="mini"
                                          v-model.trim="form.bItem.b2Item.input3"
                                          type="number"
                                          style="width:70%">

                                </el-input>
                                m²
                              </td>
                            </tr>
                          </table>
                          <div class="list_view">
                            <el-button type="primary" class="btnWeiZhi"
                                       style="margin-top: 10px;width: 28%"
                                       @click="addList('B2添加位置')">新增详细调查记录
                            </el-button>
                            <table class="tableBox" v-if="form.bItem.b2Item.childList&&form.bItem.b2Item.childList.length!==0"
                                   style="width: 100%">
                              <tr>
                                <th width="50px">序号</th>
                                <th>
                                  位置
                                </th>
                                <th>
                                  破坏类型
                                </th>
                                <th>
                                  尺寸描述
                                </th>
                                <th>
                                  照片上传
                                </th>
                                <th>
                                  操作
                                </th>
                              </tr>
                              <tr v-for="(item,index) in form.bItem.b2Item.childList" :key="index">
                                <td>{{index+1}}</td>
                                <td width="35%">
                                  <div style="width: 100%;display: inline-block">
                                    <el-input :disabled="isLook"
                                              size="mini"
                                              v-model.trim="item.input1"
                                              type="number"
                                              @mousewheel.native.prevent
                                              @DOMMouseScroll.native.prevent
                                              style="width:40%;">
                                      <template slot="prepend">边坡坡面第</template>
                                      <template slot="append">级
                                      </template>
                                    </el-input>
                                    <el-input :disabled="isLook"
                                              size="mini"
                                              v-model.trim="item.input2"
                                              type="number"
                                              @mousewheel.native.prevent
                                              @DOMMouseScroll.native.prevent
                                              style="width:40%;">
                                      <template slot="prepend"> 到第</template>
                                      <template slot="append">级
                                      </template>
                                    </el-input>
                                  </div>
                                  <div style="width: 100%;display: inline-block;">
                                    位置：
                                    <el-radio-group :disabled="isLook" size="mini" v-model="item.select1"
                                                    @change="$forceUpdate() " @focus="$forceUpdate()">
                                      <el-radio-button
                                        label="1">
                                        偏左
                                      </el-radio-button>
                                      <el-radio-button
                                        label="2">
                                        居中
                                      </el-radio-button>
                                      <el-radio-button
                                        label="3">
                                        偏右
                                      </el-radio-button>
                                    </el-radio-group>

                                  </div>

                                </td>
                                <td width="12%">
                                  <el-radio-group :disabled="isLook" size="mini" v-model="item.select2"
                                                  @change="$forceUpdate() " @focus="$forceUpdate()">
                                    <el-radio-button
                                      label="1">
                                      坍塌
                                    </el-radio-button>
                                    <el-radio-button
                                      label="2">
                                      鼓胀
                                    </el-radio-button>
                                    <el-radio-button
                                      label="3">
                                      落石
                                    </el-radio-button>
                                    <el-radio-button
                                      label="4">
                                      其他
                                    </el-radio-button>
                                  </el-radio-group>
                                </td>
                                <td width="35%">
                                  <el-radio-group :disabled="isLook" size="mini" v-model="item.select3"
                                                  @change="$forceUpdate() " @focus="$forceUpdate()">
                                    <el-radio-button
                                      label="1">
                                      尺寸无法描述
                                    </el-radio-button>
                                    <el-radio-button
                                      label="2">
                                      尺寸
                                    </el-radio-button>
                                  </el-radio-group>
                                  <div v-if="item.select3==2" style="display: flex">
                                    <el-input :disabled="isLook"
                                              size="mini"
                                              v-model.trim="item.input3"
                                              type="number"
                                              @mousewheel.native.prevent
                                              @DOMMouseScroll.native.prevent
                                              style="width:43%;">
                                      <template slot="prepend">长</template>
                                      <template slot="append">（m）
                                      </template>
                                    </el-input>
                                    <el-input :disabled="isLook"
                                              size="mini"
                                              v-model.trim="item.input4"
                                              type="number"
                                              @mousewheel.native.prevent
                                              @DOMMouseScroll.native.prevent
                                              style="width:43%;">
                                      <template slot="prepend">宽</template>
                                      <template slot="append">（cm）
                                      </template>
                                    </el-input>
                                  </div>
                                </td>
                                <td>
                                  <div v-if="item.url.length!==0" class="picBox1">
                                    <el-button v-if="!isLook" type="danger" icon="el-icon-delete" circle
                                               @click="form.bItem.b2Item.childList[index].url.splice(0,1); $forceUpdate()"
                                               style="font-size:16px">
                                    </el-button>
                                    <el-image
                                      @click="_previewImg(0,item.url)"
                                      style="width: 180px;height: 50px"
                                      fit="scale-down"
                                      :src="constUrl + item.url[0]"></el-image>
                                  </div>
                                  <upload-img
                                    v-else
                                    trigger="button"
                                    :size-limit="5"
                                    v-model="item.url"
                                    @update="setFormImg(item.url,index,'bItem.b2Item.childList')"
                                  ></upload-img>
                                </td>
                                <td>
                                  <el-button type="text"
                                             @click=" form.bItem.b2Item.childList.splice(index,1);$forceUpdate()"
                                             style="color: red">
                                    删除
                                  </el-button>
                                </td>
                              </tr>
                            </table>


                          </div>
                        </div>
                      </el-collapse-item>
                    </el-collapse>
                  </el-tab-pane>
                  <!--(S)支护-->
                  <el-tab-pane v-if="form.itemList.indexOf(2)>-1" label="(S)支护" name="(S)支护">
                    <!--重要性选择-->
                    <span slot="label"><i v-if="form.sItem.highLight"  style="color:#ff5722" class="el-icon-s-opportunity"></i>(S)支护</span>
                    <el-form-item style="width: 33%;display: inline-block">

                            <span slot="label">
                              <i style="color:red;">*</i>结构物:
                             最重要</span>
                      <el-select
                        :disabled="isLook"
                        v-model="form.sItem.mostImportant"
                        filterable
                        @change="mostImportantChange(form.sItem.mostImportant,'mostImportant')"
                        @focus="$forceUpdate()"
                      >
                        <el-option
                          v-for="item in SItemSelect1"
                          :key="item.name"
                          :label="item.name"
                          :value="item.code">
                        </el-option>
                      </el-select>

                    </el-form-item>
                    <el-form-item style="width: 33%;display: inline-block">
                            <span slot="label">
                             次重要</span>

                      <el-select
                        :disabled="isLook||form.sItem.mostImportant==0"
                        v-model="form.sItem.important"
                        filterable
                        @change="mostImportantChange(form.sItem.important,'important')"
                      >

                        <el-option
                          v-for="item in SItemSelect1"
                          :key="item.name"
                          :label="item.name"
                          :disabled="item.code===form.sItem.mostImportant"
                          :value="item.code">
                        </el-option>
                      </el-select>

                    </el-form-item>
                    <el-form-item style="width: 33%;display: inline-block">
                            <span slot="label">
                             一般重要</span>
                      <el-select
                        v-model="form.sItem.lastImportant"
                        filterable
                        :disabled="isLook||form.sItem.mostImportant==0|| form.sItem.important==0"
                        @change="mostImportantChange(form.sItem.lastImportant,'lastImportant')" @focus="$forceUpdate()"
                      >
                        <el-option
                          v-for="item in SItemSelect1"
                          :key="item.name"
                          :label="item.name"
                          :disabled="item.code===form.sItem.mostImportant||item.code===form.sItem.important"
                          :value="item.code">
                        </el-option>
                      </el-select>

                    </el-form-item>

                    <el-collapse v-model="collapseActiveName2" @change="(val)=>onChangeCollapse(val,1)" accordion>
                      <!--  (S1)锚索（杆）框架   -->
                      <el-collapse-item
                        v-if="form.sItem.mostImportant==1||form.sItem.important==1||form.sItem.lastImportant==1"
                        title="(S1)锚索（杆）框架" name="(S1)锚索（杆）框架">
                        <template slot="title">
                          <i  style="color:#ff5722"  v-if="form.sItem.s1Item.highLight"
                              class="el-icon-s-opportunity"></i>(S1)锚索（杆）框架
                        </template>
                        <div class="bItemBox">
                          <el-form-item style="width: 30%;">
                            <span slot="label">
                              <i style="color: red"> *</i>
                            评定构件总数</span>
                            <el-input type="number" :disabled="isLook" filterable clearable
                                      v-model="form.sItem.s1Item.num"></el-input>

                          </el-form-item>
                          <el-form-item style="width: 30%;margin-left: 10%">
                            <span slot="label">
                            破损评定构件总数</span>
                            <el-input  type="number" :disabled="isLook" filterable clearable
                                      v-model="form.sItem.s1Item.input1" @blur="changeChildList('s1添加位置')" @input="checkSecondValue('sItem.s1Item.num','sItem.s1Item.input1')"></el-input>
                          </el-form-item>
                        </div>
                        <div class="bItemBox">
                          <el-radio-group :disabled="isLook" v-model="form.sItem.s1Item.select1">
                            <el-radio :label="1" style="width: 100%;display: block;margin-bottom: 0.5vw">
                              该边坡分级，且只有锚索（杆）框架梁这一种保护
                            </el-radio>
                            <el-radio :label="2" style="width: 100%;display: block;margin-bottom:0.5vw">
                              <el-input :disabled="isLook"
                                        size="mini"
                                        v-model.trim="form.sItem.s1Item.input2"
                                        type="number"
                                        @mousewheel.native.prevent
                                        @DOMMouseScroll.native.prevent
                                        style="width:300px;">
                                <template slot="prepend">该边坡分级，锚索（杆）框架梁只应用与</template>

                              </el-input>
                              <el-input :disabled="isLook"
                                        size="mini"
                                        v-model.trim="form.sItem.s1Item.input3"
                                        type="number"
                                        @mousewheel.native.prevent
                                        @DOMMouseScroll.native.prevent
                                        style="width:120px;">
                                <template slot="prepend">级到</template>
                                <template slot="append">级，
                                </template>
                              </el-input>
                              还有其他支护
                              <el-radio-group :disabled="isLook" v-model="form.sItem.s1Item.select2">
                                <el-radio label="1">挡土墙</el-radio>
                                <el-radio label="2">抗滑桩</el-radio>
                              </el-radio-group>
                            </el-radio>
                            <el-radio :label="3" style="width: 100%;display: block;margin-bottom: 0.5vw">
                              该边坡未分级，且只有锚索（杆）框架梁这一种保护
                            </el-radio>
                            <el-radio :label="4" style="width: 100%;display: block;margin-bottom:0.5vw">
                              该边坡未分级，锚索（杆）框架梁只应用于边坡的
                              <el-radio-group :disabled="isLook" v-model="form.sItem.s1Item.select3">
                                <el-radio :label="1">上部</el-radio>
                                <el-radio :label="2">中部</el-radio>
                                <el-radio :label="3">下部。</el-radio>
                              </el-radio-group>
                              还有其他支护：
                              <el-radio-group :disabled="isLook" v-model="form.sItem.s1Item.select4">
                                <el-radio :label="1">挡土墙</el-radio>
                                <el-radio :label="2">抗滑桩</el-radio>
                              </el-radio-group>
                            </el-radio>
                          </el-radio-group>
                        </div>
                        <div class="list_view">
                          <el-button type="primary" class="btnWeiZhi"
                                     style="margin-top: 10px;width: 28%"
                                     @click="addList('s1添加位置')">新增详细调查记录
                          </el-button>
                          <table class="tableBox" v-if="form.sItem.s1Item.childList&&form.sItem.s1Item.childList.length!==0"
                                 style="width: 100%">
                            <tr>
                              <th width="50px">破损编号</th>
                              <th>
                                破损位置描述
                              </th>
                              <th>
                                <i style="color:red;">*</i>
                                破损标度
                              </th>
                              <th style=" width:250px">
                                照片上传
                              </th>
                              <th>
                                操作
                              </th>
                            </tr>
                            <tr v-for="(item,index) in form.sItem.s1Item.childList" :key="index">
                              <td>{{index+1}}</td>
                              <td style="width: 35%;">
                                <el-input :disabled="isLook"
                                          size="mini"
                                          v-model.trim="item.input1"
                                          type="number"
                                          @mousewheel.native.prevent
                                          @DOMMouseScroll.native.prevent
                                          style="width:130px;">
                                  <template slot="prepend">第</template>
                                  <template slot="append">级边坡，</template>
                                </el-input>
                                <el-radio-group :disabled="isLook" size="mini" v-model="item.select1"
                                                @change="$forceUpdate() " @focus="$forceUpdate()">
                                  <el-radio-button
                                    label="1">
                                    偏左
                                  </el-radio-button>
                                  <el-radio-button
                                    label="2">
                                    偏中
                                  </el-radio-button>
                                  <el-radio-button
                                    label="3">
                                    偏右
                                  </el-radio-button>
                                </el-radio-group>

                              </td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.value"
                                  filterable
                                  clearable
                                  style="width: 50%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="item in EnumScoreList4"
                                    :key="item.name"
                                    :label="item.name"
                                    :value="item.code">
                                  </el-option>
                                </el-select>
                              </td>
                              <td>
                                <div v-if="item.url.length!==0" class="picBox1">
                                  <el-button v-if="!isLook" type="danger" icon="el-icon-delete" circle
                                             @click="form.sItem.s1Item.childList[index].url.splice(0,1); $forceUpdate()"
                                             style="font-size:16px">
                                  </el-button>
                                  <el-image
                                    @click="_previewImg(0,item.url)"
                                    style="width: 180px;height: 50px"
                                    fit="scale-down"
                                    :src="constUrl + item.url[0]"></el-image>
                                </div>
                                <upload-img
                                  v-else
                                  trigger="button"
                                  :size-limit="5"
                                  v-model="item.url"
                                  @update="setFormImg(item.url,index,'form.sItem.s1Item.childList')"
                                ></upload-img>
                              </td>
                              <td>
                                <el-button type="text"
                                           @click=" form.sItem.s1Item.childList.splice(index,1); $forceUpdate()"
                                           style="color: red">
                                  删除
                                </el-button>
                              </td>
                            </tr>
                          </table>


                        </div>
                      </el-collapse-item>
                      <!--  (S2)挡土墙  -->
                      <el-collapse-item
                        v-if="form.sItem.mostImportant==2||form.sItem.important==2||form.sItem.lastImportant==2"
                        title="(S2)挡土墙" name="(S2)挡土墙">
                        <template slot="title">
                          <i  style="color:#ff5722"  v-if="form.sItem.s2Item.highLight"
                              class="el-icon-s-opportunity"></i>(S2)挡土墙
                        </template>
                        <div class="bItemBox">
                          <el-form-item style="width: 30%;">
                            <span slot="label">
                              <i style="color: red"> *</i>
                            评定构件总数</span>
                            <el-input type="number" :disabled="isLook" filterable clearable
                                      v-model="form.sItem.s2Item.num"></el-input>

                          </el-form-item>
                          <el-form-item style="width: 30%;margin-left: 10%">
                            <span slot="label">
                            破损段总数</span>
                            <el-input  type="number" :disabled="isLook" filterable clearable
                                      v-model="form.sItem.s2Item.input1" @blur="changeChildList('s2添加位置')"  @input="checkSecondValue('sItem.s2Item.num','sItem.s2Item.input1')"></el-input>
                          </el-form-item>
                        </div>
                        <div class="bItemBox">
                          <el-radio-group :disabled="isLook" v-model="form.sItem.s2Item.select1">
                            <el-radio :label="1" style="width: 100%;display: block;margin-bottom: 0.5vw">
                              该边坡分级，且只有挡土墙这一种保护
                            </el-radio>
                            <el-radio :label="2" style="width: 100%;display: block;margin-bottom:0.5vw">

                              还有其他支护
                              <el-radio-group :disabled="isLook" v-model="form.sItem.s2Item.select2">
                                <el-radio label="1">锚索（杆）框架</el-radio>
                                <el-radio label="2">抗滑桩</el-radio>
                              </el-radio-group>
                            </el-radio>
                            <el-radio :label="3" style="width: 100%;display: block;margin-bottom: 0.5vw">
                              该边坡未分级，且只有挡土墙这一种保护
                            </el-radio>
                            <el-radio :label="4" style="width: 100%;display: block;margin-bottom:0.5vw">
                              该边坡未分级，不只有挡土墙这一种支护，还有其他支护：
                              <el-radio-group :disabled="isLook" v-model="form.sItem.s1Item.select3">
                                <el-radio label="1">锚索（杆）框架</el-radio>
                                <el-radio label="2">抗滑桩</el-radio>
                              </el-radio-group>
                            </el-radio>
                          </el-radio-group>
                        </div>
                        <div class="list_view">
                          <el-button type="primary" class="btnWeiZhi"
                                     style="margin-top: 10px;width: 28%"
                                     @click="addList('s2添加位置')">新增详细调查记录
                          </el-button>
                          <table class="tableBox" v-if="form.sItem.s2Item.childList&&form.sItem.s2Item.childList.length!==0"
                                 style="width: 100%">
                            <tr>
                              <th width="120px">破损构件号</th>
                              <th>
                                <i style="color:red;">*</i> 墙体裂缝标度
                              </th>
                              <th>
                                <i style="color:red;">*</i>墙体变形标度
                              </th>
                              <th>
                                <i style="color:red;">*</i> 基础冲刷标度
                              </th>
                              <th style=" width:250px">
                                照片上传
                              </th>
                              <th>
                                操作
                              </th>
                            </tr>
                            <tr v-for="(item,index) in form.sItem.s2Item.childList" :key="index">
                              <td>{{index+1}}</td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.value"
                                  filterable
                                  clearable
                                  style="width: 50%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="item in EnumScoreList5"
                                    :key="item.name"
                                    :label="item.name"
                                    :value="item.code">
                                  </el-option>
                                </el-select>
                              </td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.value2"
                                  filterable
                                  clearable
                                  style="width: 50%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="item in EnumScoreList4"
                                    :key="item.name"
                                    :label="item.name"
                                    :value="item.code">
                                  </el-option>
                                </el-select>
                              </td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.value3"
                                  filterable
                                  clearable
                                  style="width: 50%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="item in EnumScoreList5"
                                    :key="item.name"
                                    :label="item.name"
                                    :value="item.code">
                                  </el-option>
                                </el-select>
                              </td>
                              <td>
                                <div v-if="item.url.length!==0" class="picBox1">
                                  <el-button v-if="!isLook" type="danger" icon="el-icon-delete" circle
                                             @click="form.sItem.s2Item.childList[index].url.splice(0,1); $forceUpdate()"
                                             style="font-size:16px">
                                  </el-button>
                                  <el-image
                                    @click="_previewImg(0,item.url)"
                                    style="width: 180px;height: 50px"
                                    fit="scale-down"
                                    :src="constUrl + item.url[0]"></el-image>
                                </div>
                                <upload-img
                                  v-else
                                  trigger="button"
                                  :size-limit="5"
                                  v-model="item.url"
                                  @update="setFormImg(item.url,index,'form.sItem.s2Item.childList')"
                                ></upload-img>
                              </td>
                              <td>
                                <el-button type="text"
                                           @click=" form.sItem.s2Item.childList.splice(index,1); $forceUpdate()"
                                           style="color: red">
                                  删除
                                </el-button>
                              </td>
                            </tr>
                          </table>
                        </div>
                      </el-collapse-item>
                      <!--  (S3)抗滑桩  -->
                      <el-collapse-item
                        v-if="form.sItem.mostImportant==3||form.sItem.important==3||form.sItem.lastImportant==3"
                        title="(S3)抗滑桩" name="(S3)抗滑桩">
                        <template slot="title">
                          <i  style="color:#ff5722"  v-if="form.sItem.s3Item.highLight"
                              class="el-icon-s-opportunity"></i>(S3)抗滑桩
                        </template>
                        <div class="bItemBox">
                          <el-form-item style="width: 30%;">
                            <span slot="label">
                              <i style="color: red"> *</i>
                            评定构件总数</span>
                            <el-input type="number" :disabled="isLook" filterable clearable
                                      v-model="form.sItem.s3Item.num"></el-input>

                          </el-form-item>
                          <el-form-item style="width: 30%;margin-left: 10%">
                            <span slot="label">
                            破损构件总数</span>
                            <el-input  type="number" :disabled="isLook" filterable clearable
                                      v-model="form.sItem.s3Item.input1" @blur="changeChildList('s3添加位置')"  @input="checkSecondValue('sItem.s3Item.num','sItem.s3Item.input1')"></el-input>
                          </el-form-item>
                        </div>
                        <div class="bItemBox">
                          <el-radio-group :disabled="isLook" v-model="form.sItem.s3Item.select1">
                            <el-radio :label="1" style="width: 100%;display: block;margin-bottom: 0.5vw">
                              该边坡分级，且只有抗滑桩这一种保护
                            </el-radio>
                            <el-radio :label="2" style="width: 100%;display: block;margin-bottom:0.5vw">
                              <el-input :disabled="isLook"
                                        size="mini"
                                        v-model.trim="form.sItem.s3Item.input2"
                                        type="number"
                                        @mousewheel.native.prevent
                                        @DOMMouseScroll.native.prevent
                                        style="width:300px;">
                                <template slot="prepend">该边坡分级，抗滑桩只应用与</template>
                              </el-input>
                              <el-input :disabled="isLook"
                                        size="mini"
                                        v-model.trim="form.sItem.s3Item.input3"
                                        type="number"
                                        @mousewheel.native.prevent
                                        @DOMMouseScroll.native.prevent
                                        style="width:120px;">
                                <template slot="prepend">级到</template>
                                <template slot="append">级。</template>
                              </el-input>
                              还有其他支护
                              <el-radio-group :disabled="isLook" v-model="form.sItem.s3Item.select2">
                                <el-radio label="1">挡土墙</el-radio>
                                <el-radio label="2">锚索（杆）框架</el-radio>
                              </el-radio-group>
                            </el-radio>
                            <el-radio :label="3" style="width: 100%;display: block;margin-bottom: 0.5vw">
                              该边坡未分级，且只有抗滑桩这一种保护
                            </el-radio>
                            <el-radio :label="4" style="width: 100%;display: block;margin-bottom:0.5vw">
                              该边坡未分级，抗滑桩梁只应用于边坡的
                              <el-radio-group :disabled="isLook" v-model="form.sItem.s3Item.select3">
                                <el-radio :label="1">上部</el-radio>
                                <el-radio :label="2">中部</el-radio>
                                <el-radio :label="3">下部。</el-radio>
                              </el-radio-group>
                              还有其他支护：
                              <el-radio-group :disabled="isLook" v-model="form.sItem.s3Item.select4">
                                <el-radio label="1">挡土墙</el-radio>
                                <el-radio label="2">锚索（杆）框架</el-radio>
                              </el-radio-group>
                            </el-radio>
                          </el-radio-group>
                        </div>
                        <div class="list_view">
                          <el-button type="primary" class="btnWeiZhi"
                                     style="margin-top: 10px;width: 28%"
                                     @click="addList('s3添加位置')">新增详细调查记录
                          </el-button>
                          <table class="tableBox" v-if="form.sItem.s3Item.childList&&form.sItem.s3Item.childList.length!==0"
                                 style="width: 100%">
                            <tr>
                              <th width="120px">破损构件号</th>
                              <th>
                                <i style="color:red;">*</i>破损标度
                              </th>
                              <th>
                                破损位置
                              </th>
                              <th>
                                破损部位
                              </th>
                              <th style=" width:250px">
                                照片上传
                              </th>
                              <th>
                                操作
                              </th>
                            </tr>
                            <tr v-for="(item,index) in form.sItem.s3Item.childList" :key="index">
                              <td>{{index+1}}</td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.value"
                                  filterable
                                  clearable
                                  style="width: 50%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="item in EnumScoreList3"
                                    :key="item.name"
                                    :label="item.name"
                                    :value="item.code">
                                  </el-option>
                                </el-select>
                              </td>
                              <td style="width: 40%;">
                                <el-input :disabled="isLook"
                                          size="mini"
                                          v-model.trim="item.input1"
                                          type="number"
                                          @mousewheel.native.prevent
                                          @DOMMouseScroll.native.prevent
                                          style="width:160px;">
                                  <template slot="prepend">第</template>
                                  <template slot="append">级边坡。</template>
                                </el-input>
                                <el-input :disabled="isLook"
                                          size="mini"
                                          v-model.trim="item.input2"
                                          type="number"
                                          @mousewheel.native.prevent
                                          @DOMMouseScroll.native.prevent
                                          style="width:160px;">
                                  <template slot="prepend">左起第一</template>
                                  <template slot="append">根</template>
                                </el-input>
                              </td>
                              <td style="width: ;">
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.select1"
                                  filterable
                                  clearable
                                  style="width: 70%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    label="抗滑桩"
                                    value=1>
                                  </el-option>
                                  <el-option
                                    label="桩间墙"
                                    value=2>
                                  </el-option>
                                  <el-option
                                    label="锚固系统"
                                    value=3>
                                  </el-option>
                                </el-select>
                              </td>
                              <td>
                                <div v-if="item.url.length!==0" class="picBox1">
                                  <el-button v-if="!isLook" type="danger" icon="el-icon-delete" circle
                                             @click="form.sItem.s3Item.childList[index].url.splice(0,1); $forceUpdate()"
                                             style="font-size:16px">
                                  </el-button>
                                  <el-image
                                    @click="_previewImg(0,item.url)"
                                    style="width: 180px;height: 50px"
                                    fit="scale-down"
                                    :src="constUrl + item.url[0]"></el-image>
                                </div>
                                <upload-img
                                  v-else
                                  trigger="button"
                                  :size-limit="5"
                                  v-model="item.url"
                                  @update="setFormImg(item.url,index,'form.sItem.s3Item.childList')"
                                ></upload-img>
                              </td>
                              <td>
                                <el-button type="text"
                                           @click=" form.sItem.s3Item.childList.splice(index,1); $forceUpdate()"
                                           style="color: red">
                                  删除
                                </el-button>
                              </td>
                            </tr>
                          </table>
                        </div>
                      </el-collapse-item>
                    </el-collapse>
                  </el-tab-pane>
                  <!--(D)截排水设施-->
                  <el-tab-pane v-if="form.itemList.indexOf(3)>-1" label="(D)截排水设施" name="(D)截排水设施">
                    <!--工况-->
                    <span slot="label"><i v-if="form.dItem.highLight"  style="color:#ff5722" class="el-icon-s-opportunity"></i>(D)截排水设施</span>
                    <el-form-item>
                  <span slot="label"><i style="color:red;">*</i>工况:
                   </span>
                      <el-radio-group :disabled="isLook" v-model="form.dItem.dangQiang">
                        <el-radio-button v-for="option1 in dangQiangList"
                                         :key="option1.code"
                                         :label="option1.code">{{ option1.name }}
                        </el-radio-button>
                      </el-radio-group>
                    </el-form-item>
                    <el-form-item>
                  <span slot="label"><i style="color:red;">*</i>结构物选择:
                   </span>
                      <el-checkbox-group :disabled="isLook|| !form.dItem.dangQiang" size="small" :max="2"
                                         v-model="form.dItem.dList"
                      >
                        <el-checkbox-button
                          v-for="option1 in EmunDList"
                          :key="option1.code"
                          :label="option1.code"
                        >{{ option1.name }}
                        </el-checkbox-button>
                      </el-checkbox-group>
                    </el-form-item>
                    <el-collapse v-model="collapseActiveName3" @change="(val)=>onChangeCollapse(val,1)" accordion>
                      <!--  (D1)截排水沟(槽，井)破损  -->
                      <el-collapse-item v-if="form.dItem.dList.indexOf('1')>-1 ||form.dItem.dList.indexOf(1)>-1"
                                        title="(D1)截排水沟(槽，井)破损" name="(D1)截排水沟(槽，井)破损">
                        <template slot="title">
                          <i  style="color:#ff5722"  v-if="form.dItem.d1Item.highLight"
                              class="el-icon-s-opportunity"></i>(D1)截排水沟(槽，井)破损
                        </template>
                        <div class="bItemBox">
                          <el-form-item style="width: 30%;">
                            <span slot="label">
                              <i style="color: red"> *</i>
                            评定构件总数</span>
                            <el-input type="number" :disabled="isLook" filterable clearable
                                      v-model="form.dItem.d1Item.num"></el-input>

                          </el-form-item>
                          <el-form-item style="width: 30%;margin-left: 10%">
                            <span slot="label">
                            破损构件总数</span>
                            <el-input  type="number" :disabled="isLook" filterable clearable blur="changeChildList('d1添加位置')"  @input="checkSecondValue('dItem.d1Item.num','dItem.d1Item.input1')"
                                      v-model="form.dItem.d1Item.input1"></el-input>
                          </el-form-item>
                        </div>
                        <div class="list_view">
                          <el-button type="primary" class="btnWeiZhi"
                                     style="margin-top: 10px;width: 28%"
                                     @click="addList('d1添加位置')">新增详细调查记录
                          </el-button>
                          <table class="tableBox" v-if="form.dItem.d1Item.childList&&form.dItem.d1Item.childList.length!==0"
                                 style="width: 100%">
                            <tr>
                              <th width="120px">破损构件号</th>
                              <th>
                                <i style="color:red;">*</i>破损标度
                              </th>
                              <th>
                                破损位置
                              </th>
                              <th>
                                破损类型
                              </th>
                              <th style=" width:250px">
                                照片上传
                              </th>
                              <th>
                                操作
                              </th>
                            </tr>
                            <tr v-for="(item,index) in form.dItem.d1Item.childList" :key="index">
                              <td>{{index+1}}</td>
                              <td
                                v-if="form.dItem.d1Item.childList[index].select1==4||form.dItem.d1Item.childList[index].select1==5">
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.value"
                                  filterable
                                  clearable
                                  style="width: 50%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="item in EnumScoreList3"
                                    :key="item.name"
                                    :label="item.name"
                                    :value="item.code">
                                  </el-option>
                                </el-select>
                              </td>
                              <td v-else>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.value"
                                  filterable
                                  clearable
                                  style="width: 50%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="item in EnumScoreList5"
                                    :key="item.name"
                                    :label="item.name"
                                    :value="item.code">
                                  </el-option>
                                </el-select>
                              </td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.select1"
                                  filterable
                                  clearable
                                  style="width: 70%;"
                                  @change="form.dItem.d1Item.childList[index].value='';$forceUpdate() "
                                  @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="option in d1ItemSelect1"
                                    :key="option.name"
                                    :label="option.name"
                                    :value="option.code">
                                  </el-option>

                                </el-select>
                              </td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.select2"
                                  filterable
                                  clearable
                                  style="width: 70%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="option in d1ItemSelect2"
                                    :key="option.name"
                                    :label="option.name"
                                    :value="option.code">
                                  </el-option>

                                </el-select>
                              </td>
                              <td>
                                <div v-if="item.url.length!==0" class="picBox1">
                                  <el-button v-if="!isLook" type="danger" icon="el-icon-delete" circle
                                             @click="form.dItem.d1Item.childList[index].url.splice(0,1); $forceUpdate()"
                                             style="font-size:16px">
                                  </el-button>
                                  <el-image
                                    @click="_previewImg(0,item.url)"
                                    style="width: 180px;height: 50px"
                                    fit="scale-down"
                                    :src="constUrl + item.url[0]"></el-image>
                                </div>
                                <upload-img
                                  v-else
                                  trigger="button"
                                  :size-limit="5"
                                  v-model="item.url"
                                  @update="setFormImg(item.url,index,'form.dItem.d1Item.childList')"
                                ></upload-img>
                              </td>
                              <td>
                                <el-button type="text"
                                           @click=" form.dItem.d1Item.childList.splice(index,1); $forceUpdate()"
                                           style="color: red">
                                  删除
                                </el-button>
                              </td>
                            </tr>
                          </table>
                        </div>
                      </el-collapse-item>

                      <!--  (D2)泄水孔  -->
                      <el-collapse-item v-if="form.dItem.dList.indexOf('2')>-1||form.dItem.dList.indexOf(2)>-1"
                                        title="(D2)泄水孔 " name="(D2)泄水孔">
                        <template slot="title">
                          <i  style="color:#ff5722"  v-if="form.dItem.d2Item.highLight"
                              class="el-icon-s-opportunity"></i>(D2)泄水孔
                        </template>

                        <div class="list_view">

                          <div class="bItemBox">
                            <el-form-item style="width:20%;" label-width="25%">
                            <span slot="label">
<!--                                          <el-popover-->
<!--                                            placement="top"-->
<!--                                            trigger="click">-->
<!--                                  <el-image :src="require(tips.img + '')"-->
<!--                                            fit="contain"></el-image>-->
<!--                              <i slot="reference" class="el-icon-question tips"-->
<!--                                 @click="showTips('(D2)泄水孔')"></i>-->
<!--                            </el-popover>-->
                              <i style="color: red"> *</i>

                            标度</span>
                              <el-select
                                :disabled="isLook"
                                v-model="form.dItem.d2Item.value"
                                filterable
                                clearable
                                style="width: 90%;"
                                @change="$forceUpdate() " @focus="$forceUpdate()"
                              >
                                <el-option
                                  v-for="option in EnumScoreList5"
                                  :key="option.name"
                                  :label="option.name"
                                  :value="option.code">
                                </el-option>

                              </el-select>
                            </el-form-item>
                            <el-form-item style="width: 40%;" label-width="42%">
                            <span slot="label">
                              <i style="color: red"> *</i>
                            上部泄水孔泄水状态描述</span>
                              <el-select
                                :disabled="isLook"
                                v-model="form.dItem.d2Item.select1"
                                filterable
                                clearable
                                style="width: 98%;"
                                @change="$forceUpdate() " @focus="$forceUpdate()"
                              >
                                <el-option
                                  v-for="option in d2ItemSelect1"
                                  :key="option.name"
                                  :label="option.name"
                                  :value="option.code">
                                </el-option>

                              </el-select>
                            </el-form-item>
                            <el-form-item style="width:40%;" label-width="40%">
                            <span slot="label">
                            下部泄水孔泄水状态描述</span>
                              <el-select
                                v-if="form.dItem.dangQiang==1"
                                :disabled="isLook"
                                v-model="form.dItem.d2Item.select2"
                                filterable
                                clearable
                                style="width: 70%;"
                                @change="$forceUpdate() " @focus="$forceUpdate()"
                              >
                                <el-option
                                  v-for="option in d2ItemSelect2_1"
                                  :key="option.name"
                                  :label="option.name"
                                  :value="option.code">
                                </el-option>

                              </el-select>
                              <el-select
                                v-if="form.dItem.dangQiang==2"
                                :disabled="isLook"
                                v-model="form.dItem.d2Item.select2"
                                filterable
                                clearable
                                style="width: 100%;"
                                @change="$forceUpdate() " @focus="$forceUpdate()"
                              >
                                <el-option
                                  v-for="option in d2ItemSelect2_2"
                                  :key="option.name"
                                  :label="option.name"
                                  :value="option.code">
                                </el-option>

                              </el-select>
                            </el-form-item>
                          </div>
                        </div>
                      </el-collapse-item>
                    </el-collapse>
                  </el-tab-pane>
                  <!--(C)坡面防护设施-->
                  <el-tab-pane v-if="form.itemList.indexOf(4)>-1" label="(C)坡面防护设施" name="(C)坡面防护设施">
                    <!--工况-->
                    <span slot="label"><i v-if="form.cItem.highLight"  style="color:#ff5722" class="el-icon-s-opportunity"></i>(C)坡面防护设施</span>

                    <el-form-item>
                  <span slot="label"><i style="color:red;">*</i>工况:
                   </span>
                      <el-radio-group :disabled="isLook" v-model="form.cItem.slopeTechniqueType">
                        <el-radio-button v-for="option1 in slopeTechniqueTypeList"
                                         :key="option1.code"
                                         :label="option1.code">{{ option1.name }}
                        </el-radio-button>

                      </el-radio-group>
                    </el-form-item>
                    <el-form-item>
                  <span slot="label"><i style="color:red;">*</i>结构物选择:
                   </span>
                      <el-checkbox-group :disabled="isLook" size="small" :max="3" v-model="form.cItem.cList"
                      >
                        <el-checkbox-button
                          v-for="option1 in EmunCList"
                          :key="option1.code"
                          :label="option1.code"

                        >{{ option1.name }}
                        </el-checkbox-button>
                      </el-checkbox-group>
                    </el-form-item>
                    <el-collapse v-model="collapseActiveName3" @change="(val)=>onChangeCollapse(val,1)" accordion>
                      <!--  (C1)圬工防护  -->
                      <el-collapse-item v-if="form.cItem.cList.indexOf(1)>-1" title="(C1)圬工防护" name="(C1)圬工防护">
                        <template slot="title">
                          <i  style="color:#ff5722"  v-if="form.cItem.c1Item.highLight"
                              class="el-icon-s-opportunity"></i>(C1)圬工防护
                        </template>
                        <div class="bItemBox">
                          <el-form-item style="width: 30%;">
                            <span slot="label">
                              <i style="color: red"> *</i>
                            评定构件总数</span>
                            <el-input type="number" :disabled="isLook" filterable clearable
                                      v-model="form.cItem.c1Item.num"></el-input>

                          </el-form-item>
                          <el-form-item style="width: 30%;margin-left: 10%">
                            <span slot="label">
                              <i style="color: red"> *</i>破损构件总数</span>
                            <el-input  type="number" :disabled="isLook" filterable clearable
                                      v-model="form.cItem.c1Item.input1"  @blur="changeChildList('c1添加位置')"  @input="checkSecondValue('cItem.c1Item.num','cItem.c1Item.input1')"></el-input>
                          </el-form-item>
                        </div>
                        <div class="list_view">
                          <el-button type="primary" class="btnWeiZhi"
                                     style="margin-top: 10px;width: 28%"
                                     @click="addList('c1添加位置')">新增详细调查记录
                          </el-button>
                          <table class="tableBox" v-if="form.cItem.c1Item.childList&&form.cItem.c1Item.childList.length!==0"
                                 style="width: 100%">
                            <tr>
                              <th width="120px">破损构件号</th>
                              <th>
                                <i style="color:red;">*</i>
                                破损标度
                              </th>
                              <th>
                                圬工类型
                              </th>
                              <th>
                                破损位置
                              </th>
                              <th style=" width:250px">
                                照片上传
                              </th>
                              <th>
                                操作
                              </th>
                            </tr>
                            <tr v-for="(item,index) in form.cItem.c1Item.childList" :key="index">
                              <td>{{index+1}}</td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.value"
                                  filterable
                                  clearable
                                  style="width: 50%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="item in EnumScoreList4"
                                    :key="item.name"
                                    :label="item.name"
                                    :value="item.code">
                                  </el-option>
                                </el-select>
                              </td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.select1"
                                  filterable
                                  clearable
                                  style="width: 70%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="option in c1ItemSelect1"
                                    :key="option.name"
                                    :label="option.name"
                                    :value="option.code">
                                  </el-option>

                                </el-select>
                              </td>
                              <td>
                                <el-input :disabled="isLook"
                                          size="mini"
                                          v-model.trim="item.input1"
                                          type="number"
                                          @mousewheel.native.prevent
                                          @DOMMouseScroll.native.prevent
                                          style="width:160px;">
                                  <template slot="prepend">边坡第</template>
                                  <template slot="append">级</template>
                                </el-input>
                              </td>
                              <td>
                                <div v-if="item.url.length!==0" class="picBox1">
                                  <el-button v-if="!isLook" type="danger" icon="el-icon-delete" circle
                                             @click="form.cItem.c1Item.childList[index].url.splice(0,1); $forceUpdate()"
                                             style="font-size:16px">
                                  </el-button>
                                  <el-image
                                    @click="_previewImg(0,item.url)"
                                    style="width: 180px;height: 50px"
                                    fit="scale-down"
                                    :src="constUrl + item.url[0]"></el-image>
                                </div>
                                <upload-img
                                  v-else
                                  trigger="button"
                                  :size-limit="5"
                                  v-model="item.url"
                                  @update="setFormImg(item.url,index,'form.cItem.c1Item.childList')"
                                ></upload-img>
                              </td>
                              <td>
                                <el-button type="text"
                                           @click=" form.cItem.c1Item.childList.splice(index,1); $forceUpdate()"
                                           style="color: red">
                                  删除
                                </el-button>
                              </td>
                            </tr>
                          </table>
                        </div>
                      </el-collapse-item>

                      <!--  (C2)植被防护  -->
                      <el-collapse-item v-if="form.cItem.cList.indexOf(2)>-1" title="(C2)植被防护" name="(C2)植被防护">
                        <template slot="title">
                          <i  style="color:#ff5722"  v-if="form.cItem.c2Item.highLight"
                              class="el-icon-s-opportunity"></i>(C2)植被防护
                        </template>
                        <div class="bItemBox">
                          <el-form-item style="width: 30%;">
                            <span slot="label">
                              <i style="color: red"> *</i>
                            评定构件总数</span>
                            <el-input type="number" :disabled="isLook" filterable clearable
                                      v-model="form.cItem.c2Item.num"></el-input>

                          </el-form-item>
                          <el-form-item style="width: 30%;margin-left: 10%">
                            <span slot="label">
                              <i style="color: red"> *</i>破损构件总数</span>
                            <el-input  type="number" :disabled="isLook" filterable clearable
                                      v-model="form.cItem.c2Item.input1" @blur="changeChildList('c2添加位置')"  @input="checkSecondValue('cItem.c2Item.num','cItem.c2Item.input1')"></el-input>
                          </el-form-item>
                        </div>
                        <div class="list_view">
                          <el-button type="primary" class="btnWeiZhi"
                                     style="margin-top: 10px;width: 28%"
                                     @click="addList('c2添加位置')">新增详细调查记录
                          </el-button>
                          <table class="tableBox" v-if="form.cItem.c2Item.childList&&form.cItem.c2Item.childList.length!==0"
                                 style="width: 100%">
                            <tr>
                              <th width="120px">破损构件号</th>
                              <th>
                                <i style="color:red;">*</i>破损标度
                              </th>
                              <th>
                                破损描述
                              </th>
                              <th>
                                破损位置
                              </th>
                              <th style=" width:250px">
                                照片上传
                              </th>
                              <th>
                                操作
                              </th>
                            </tr>
                            <tr v-for="(item,index) in form.cItem.c2Item.childList" :key="index">
                              <td>{{index+1}}</td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.value"
                                  filterable
                                  clearable
                                  style="width: 50%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="item in EnumScoreList4"
                                    :key="item.name"
                                    :label="item.name"
                                    :value="item.code">
                                  </el-option>
                                </el-select>
                              </td>
                              <td>
                                <el-input :disabled="isLook"
                                          size="mini"
                                          v-model.trim="item.input1"
                                          type="number"
                                          @mousewheel.native.prevent
                                          @DOMMouseScroll.native.prevent
                                          style="width:160px;">
                                  <template slot="prepend">缺损比例约</template>
                                  <template slot="append">%</template>
                                </el-input>
                              </td>
                              <td>
                                <el-input :disabled="isLook"
                                          size="mini"
                                          v-model.trim="item.input2"
                                          type="number"
                                          @mousewheel.native.prevent
                                          @DOMMouseScroll.native.prevent
                                          style="width:160px;">
                                  <template slot="prepend">边坡第</template>
                                  <template slot="append">级</template>
                                </el-input>
                              </td>
                              <td>
                                <div v-if="item.url.length!==0" class="picBox1">
                                  <el-button v-if="!isLook" type="danger" icon="el-icon-delete" circle
                                             @click="form.cItem.c2Item.childList[index].url.splice(0,1); $forceUpdate()"
                                             style="font-size:16px">
                                  </el-button>
                                  <el-image
                                    @click="_previewImg(0,item.url)"
                                    style="width: 180px;height: 50px"
                                    fit="scale-down"
                                    :src="constUrl + item.url[0]"></el-image>
                                </div>
                                <upload-img
                                  v-else
                                  trigger="button"
                                  :size-limit="5"
                                  v-model="item.url"
                                  @update="setFormImg(item.url,index,'form.cItem.c2Item.childList')"
                                ></upload-img>
                              </td>
                              <td>
                                <el-button type="text"
                                           @click=" form.cItem.c2Item.childList.splice(index,1); $forceUpdate()"
                                           style="color: red">
                                  删除
                                </el-button>
                              </td>
                            </tr>
                          </table>
                        </div>
                      </el-collapse-item>
                      <!--  (C3)柔性防护网 -->
                      <el-collapse-item v-if="form.cItem.cList.indexOf(3)>-1" title="(C3)柔性防护网" name="(C3)柔性防护网">
                        <template slot="title">
                          <i  style="color:#ff5722"  v-if="form.cItem.c3Item.highLight"
                              class="el-icon-s-opportunity"></i>(C3)柔性防护网
                        </template>
                        <div class="bItemBox">
                          <el-form-item style="width: 30%;">
                            <span slot="label">
                              <i style="color: red"> *</i>
                            评定构件总数</span>
                            <el-input type="number" :disabled="isLook" filterable clearable
                                      v-model="form.cItem.c3Item.num"></el-input>

                          </el-form-item>
                          <el-form-item style="width: 30%;margin-left: 10%">
                            <span slot="label">
                              <i style="color: red"> *</i>破损构件总数</span>
                            <el-input  :disabled="isLook" filterable clearable
                                      type="number"
                                      v-model="form.cItem.c3Item.input1" @blur="changeChildList('c3添加位置')"  @input="checkSecondValue('cItem.c3Item.num','cItem.c3Item.input1')"></el-input>
                          </el-form-item>
                        </div>
                        <div class="list_view">
                          <el-button type="primary" class="btnWeiZhi"
                                     style="margin-top: 10px;width: 28%"
                                     @click="addList('c3添加位置')">新增详细调查记录
                          </el-button>
                          <table class="tableBox" v-if="form.cItem.c3Item.childList&&form.cItem.c3Item.childList.length!==0"
                                 style="width: 100%">
                            <tr>
                              <th width="120px">破损构件号</th>
                              <th>
                                <i style="color:red;">*</i>破损标度
                              </th>
                              <th>
                                柔性网类型
                              </th>
                              <th>
                                破损类型
                              </th>
                              <th style=" width:250px">
                                照片上传
                              </th>
                              <th>
                                操作
                              </th>
                            </tr>
                            <tr v-for="(item,index) in form.cItem.c3Item.childList" :key="index">
                              <td>{{index+1}}</td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.value"
                                  filterable
                                  clearable
                                  style="width: 50%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="item in EnumScoreList4"
                                    :key="item.name"
                                    :label="item.name"
                                    :value="item.code">
                                  </el-option>
                                </el-select>
                              </td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.select1"
                                  filterable
                                  clearable
                                  style="width: 70%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="option in c3ItemSelect1"
                                    :key="option.name"
                                    :label="option.name"
                                    :value="option.code">
                                  </el-option>

                                </el-select>
                              </td>
                              <td>
                                <el-select
                                  :disabled="isLook"
                                  v-model="item.select2"
                                  filterable
                                  clearable
                                  style="width: 70%;"
                                  @change="$forceUpdate() " @focus="$forceUpdate()"
                                >
                                  <el-option
                                    v-for="option in c3ItemSelect2"
                                    :key="option.name"
                                    :label="option.name"
                                    :value="option.code">
                                  </el-option>

                                </el-select>
                              </td>
                              <td>
                                <div v-if="item.url.length!==0" class="picBox1">
                                  <el-button v-if="!isLook" type="danger" icon="el-icon-delete" circle
                                             @click="form.cItem.c2Item.childList[index].url.splice(0,1); $forceUpdate()"
                                             style="font-size:16px">
                                  </el-button>
                                  <el-image
                                    @click="_previewImg(0,item.url)"
                                    style="width: 180px;height: 50px"
                                    fit="scale-down"
                                    :src="constUrl + item.url[0]"></el-image>
                                </div>
                                <upload-img
                                  v-else
                                  trigger="button"
                                  :size-limit="5"
                                  v-model="item.url"
                                  @update="setFormImg(item.url,index,'form.cItem.c2Item.childList')"
                                ></upload-img>
                              </td>
                              <td>
                                <el-button type="text"
                                           @click=" form.cItem.c3Item.childList.splice(index,1); $forceUpdate()"
                                           style="color: red">
                                  删除
                                </el-button>
                              </td>
                            </tr>
                          </table>
                        </div>
                      </el-collapse-item>
                    </el-collapse>
                  </el-tab-pane>
                </el-tabs>


              </el-card>
              <div class="button-foot" >
                <el-button  v-if="!isLook"
                            class="common_btn-defalut"
                            type="primary"
                            :disabled="isDisabled"
                            @click="validatorForm">提交记录
                </el-button>
              </div>
            </div>



          </el-tab-pane>
        </el-tabs>

      </el-card>

    </el-form>
    <picture-viewer ref="imageViewer"></picture-viewer>
  </div>
</template>

<script>
  import {getTemplateContent, putTechnicalForm, updateTechnicalFormNew} from "@/services/model/form";
  import ItemMixins from "../item.mixins";
  import UploadImg from "@/components/upload-img";
  import Organization from "@/components/organization-unit/all";
  import PictureViewer from "@/components/picture-viewer/index";
  import FormBase2 from "../../base_info/slope-modules/form-base2";
  import FormDiZhi from "../../base_info/slope-modules/form-dizhi";
  import FormImg from "../../base_info/slope-modules/form-img";
  import FormFangHu from "../../base_info/slope-modules/form-fanghu";
  import FormType from "../../base_info/slope-modules/form-type";
  import Enums from '@/utils/enums'

  export default {
    props: ['currentRow', 'isLook'],
    components: {UploadImg, Organization, PictureViewer,FormBase2,
      FormType,
      FormDiZhi,
      FormFangHu,
      FormImg,},
    mixins: [ItemMixins,Enums],
    data() {
      return {   isEdit:false,
        roadList: [],
        slopeTechniqueTypeList: [{
          code: 1, name: '岩质边坡'
        }, {
          code: 2, name: '土质边坡(土体)'
        }, {
          code: 3, name: '土质边坡(碎石岩块和土体混合) '
        }],
        EmunCList: [{
          code: 1, name: '(C1)圬工防护'
        }, {
          code: 2, name: '(C2)植被防护'
        }, {
          code: 3, name: '(C3)柔性防护网'
        }],
        c1ItemSelect1: [{
          code: 1,
          name: '窗式护面墙'
        }, {
          code: 2,
          name: '实体护面墙'
        }, {
          code: 3,
          name: '挂网喷射混凝土'
        }, {
          code: 4,
          name: '骨架防护'
        }, {
          code: 5,
          name: '其他圬工结构'
        },
        ],
        c3ItemSelect1: [{
          code: 1,
          name: '主动防护网'
        }, {
          code: 2,
          name: '被动防护网'
        },
        ], c3ItemSelect2: [{
          code: 1,
          name: '网材破损'
        }, {
          code: 2,
          name: '锚固系统破损'
        },
        ],
        d1ItemSelect1: [{
          code: 1,
          name: '边沟'
        }, {
          code: 2,
          name: '排水沟'
        }, {
          code: 3,
          name: '截水沟'
        }, {
          code: 4,
          name: '急流槽'
        }, {
          code: 5,
          name: '渗井'
        },
        ],
        d1ItemSelect2: [{
          code: 1,
          name: '堵塞'
        }, {
          code: 2,
          name: '破损'
        }, {
          code: 3,
          name: '堵塞+破损'
        }],
        d2ItemSelect1: [{
          code: 1,
          name: '全部正常排水'
        }, {
          code: 2,
          name: '上部泄水部分堵塞'
        }, {
          code: 3,
          name: '上部泄水孔大部分（超过2/3）或全部堵塞'
        }, {
          code: 4,
          name: '上部泄水全部堵塞'
        }],
        d2ItemSelect2_1: [{
          code: 1,
          name: '下部泄水孔全部正常排水'
        }, {
          code: 2,
          name: '下部泄水孔堵塞数量少于1/2'
        }, {
          code: 3,
          name: '下部泄水孔堵塞数量超过1/2，少于2/3'
        }, {
          code: 4,
          name: '下部泄水孔堵塞数量超过2/3'
        }, {
          code: 5,
          name: '下部泄水孔全部堵塞'
        }],
        d2ItemSelect2_2: [{
          code: 1,
          name: '下部泄水孔全部正常排水'
        }, {
          code: 2,
          name: '下部泄水孔堵塞数量少于1/3'
        }, {
          code: 3,
          name: '下部泄水孔堵塞数量超过1/3，少于1/2'
        }, {
          code: 4,
          name: '下部泄水孔堵塞数量超过1/2'
        }, {
          code: 5,
          name: '下部泄水孔全部堵塞'
        }],
        dangQiangList: [{
          code: 1, name: '挡墙支护'
        }, {
          code: 2, name: '非挡墙支护'
        }],
        EmunDList: [{
          code: 1, name: '(D1)截排水沟(槽，井)破损'
        }, {
          code: 2, name: '(D2)泄水孔'
        }],
        collapseActiveName3: "",
        form: {
          itemList: [1],
          bItem: {
            b1Item: {
              select1: '',
              value: '',
              input1: '',
              input2: '',
              input3: '',
              input4: '',
              childList: []
            },
            b2Item: {
              select1: '',
              value: '',
              input1: '',
              input2: '',
              input3: '',
              input4: '',
              childList: []
            }
          },
          sItem: {
            mostImportant: 0,//最重要
            important: 0,//次重要
            lastImportant: 0,//一般重要
            s1Item: {
              num: '',
              select1: '',
              select2: '',
              select3: '',
              select4: '',
              value: '',
              input1: '',
              input2: '',
              input3: '',
              input4: '',
              childList: []
            },
            s2Item: {
              num: '',
              select1: '',
              value: '',
              input1: '',
              input2: '',
              input3: '',
              input4: '',
              childList: []
            },
            s3Item: {
              num: '',
              select1: '',
              select2: '',
              select3: '',
              select4: '',
              value: '',
              input1: '',
              input2: '',
              input3: '',
              input4: '',
              childList: []
            },
          },
          dItem: {
            dangQiang: 0,
            dList: [],
            d1Item: {
              num: '',
              select1: '',
              select2: '',
              select3: '',
              select4: '',
              value: '',
              input1: '',
              input2: '',
              input3: '',
              input4: '',
              childList: []
            },
            d2Item: {
              num: '',
              select1: '',
              value: '',
              input1: '',
              input2: '',
              input3: '',
              input4: '',
              childList: []
            },
            s3Item: {
              num: '',
              select1: '',
              select2: '',
              select3: '',
              select4: '',
              value: '',
              input1: '',
              input2: '',
              input3: '',
              input4: '',
              childList: []
            },
          },
          cItem: {
            slopeTechniqueType: '',
            cList: [],
            c1Item: {
              num: '',
              select1: '',
              select2: '',
              select3: '',
              select4: '',
              value: '',
              input1: '',
              input2: '',
              input3: '',
              input4: '',
              childList: []
            },
            c2Item: {
              num: '',
              select1: '',
              value: '',
              input1: '',
              input2: '',
              input3: '',
              input4: '',
              childList: []
            },
            c3Item: {
              num: '',
              select1: '',
              select2: '',
              select3: '',
              select4: '',
              value: '',
              input1: '',
              input2: '',
              input3: '',
              input4: '',
              childList: []
            },
          },
        },

        EnumScoreList4: [],
        EnumScoreList5: [],
        EnumScoreList3: [],
        formItemList: [
          {
            code: 1,
            name: '(B)坡体'
          },
          {
            code: 2,
            name: ' (S)支护 '
          },
          {
            code: 3,
            name: '(D)截排水设施 '
          },
          {
            code: 4,
            name: '(C)坡面防护设施'
          }
        ],
        b1ItemSelect2: [{
          code: 1,
          name: '未发现坡体裂缝'
        }, {
          code: 2,
          name: '发现坡体裂缝'
        }],
        b2ItemSelect2: [{
          code: 1,
          name: '未发现坡体坍塌'
        }, {
          code: 2,
          name: '发现坡体坍塌'
        }],
        SItemSelect1: [
          {
            code: 0,
            name: '无'
          },
          {
            code: 1,
            name: '(S1)锚索（杆）框架'
          }, {
            code: 2,
            name: '(S2)挡土墙'
          },
          {
            code: 3,
            name: '(S3)抗滑桩'
          }
        ],
        activeNameCard: 'first',
        isDisabled: false,
        rules: {
          deptTreeId: {required: true, message: "请选择管养单位"},
          roadId: {required: true, message: "请选择路线"},
          slopeId: {required: true, message: "请选择边坡"},
        },
        collapseActiveName1: "",
        collapseActiveName2: "",
        activeName: '(B)坡体',
        activeName1: "base",
        tabListActive: "序号1",
        EnumTechniqueSingleControlList: [],
        listIndex1: 0,
        listIndex2: 0,
      };
    },
    computed: {
      form1() {
        return this.currentRow
      },
      weightList() {
        let list = []
        this.currentRow.formList.map(x => {
          if (x.name === '(S)支护') {
            x.childList.map(y => {
              if (y.name === '选择支护措施') {
                list = this.getWeightList(y.valueList)
                return list
              }
            })
          }
        })
        return list
      },
    },
    methods: {
      checkSecondValue(num,input) {
        if (this.getValueByPath(this.form, input) > this.getValueByPath(this.form, num)) {
          this.$message({
            type: 'warning',
            message: '第二个输入框的值不能超过第一个输入框的值'
          })
        }
      },
      getValueByPath(obj, path) {
        return path.split('.').reduce((o, key) => (o && o[key] != null) ? o[key] : null, obj);
      },
      //很重要程度修改
      mostImportantChange(data, type) {
        if (type == 'mostImportant') {
          this.form.sItem.important = 0;
          this.form.sItem.lastImportant = 0
        }
        if (type == 'important') {
          this.form.sItem.lastImportant = 0

        }

        this.$forceUpdate()
      },
      // 查看大图
      previewImg(url) {
        let list = url.map(x => {
          return this.constUrl + x
        })
        this.$refs.imageViewer.showViewer(list, 0)
      },
      // 查看大图
      _previewImg(index, pic) {
        let urlList = pic.map(x => {
          return this.constUrl + x
        })
        // 显示照片查看器
        this.$refs.imageViewer.showViewer(urlList, index);
      },

      initTabActive() {
        this.tabListActive = "序号1"
      },
      // 上传成功后处理图片
      setFormImg(path, index1, type) {
        return;
        if (!path) {
          return
        }
        this.listIndex1 = index1
        this.listIndex2 = index2
        let no = "00"
        if (index2 < 9) {
          no = no + (index1 + 1)
        } else {
          no = "0" + (index1 + 1)
        }
        let picNo = '请先选择边坡，用于生成照片编号！'
        if (this.slopeInfo) {
          picNo = this.slopeInfo.slopeNo + "-" + this.timeFormat(new Date(), 'yyyyMMdd') + "-" + no
        }
        let pic = {
          name: picNo, //照片编号SID-DATE-B1-001，边坡id+时间+调查项编号+序号
          url: path[0]
        }
        if (type == 'form.bItem.b1Item.childList') {
          this.form.bItem.b1Item.childList.picList.push(pic)
        } else if (type == 'form.sItem.s1Item.childList') {
          this.form.sItem.s1Item.childList.picList.push(pic)
        } else if (type == 'form.sItem.s2Item.childList') {
          this.form.sItem.s2Item.childList.picList.push(pic)
        } else if (type == 'form.sItem.s3Item.childList') {
          this.form.sItem.s3Item.childList.picList.push(pic)
        } else if (type == 'form.dItem.d1Item.childList') {
          this.form.dItem.d1Item.childList.picList.push(pic)
        } else if (type == 'form.cItem.c1Item.childList') {
          this.form.cItem.c1Item.childList.picList.push(pic)
        } else if (type == 'form.cItem.c2Item.childList') {
          this.form.cItem.c2Item.childList.picList.push(pic)
        } else if (type == 'form.cItem.c3Item.childList') {
          this.form.cItem.c3Item.childList.picList.push(pic)
        }
      },
      changeChildList(name) {
        if (this.isLook) {
          return
        }
        if (name === 's1添加位置') {
          if (this.form.sItem.s1Item.input1 == 0 || this.form.sItem.s1Item.input1 == null) {
            this.form.sItem.s1Item.childList = []
          }
        } else if (name === 's2添加位置') {
          if (this.form.sItem.s2Item.input1 == 0 || this.form.sItem.s2Item.input1 == null) {
            this.form.sItem.s2Item.childList = []
          }
        } else if (name === 's3添加位置') {
          if (this.form.sItem.s3Item.input1 == 0 || this.form.sItem.s3Item.input1 == null) {
            this.form.sItem.s3Item.childList = []
          }
        } else if (name === 'd1添加位置') {
          if (this.form.dItem.d1Item.input1 == 0 || this.form.dItem.d1Item.input1 == null) {
            this.form.dItem.d1Item.childList = []
          }
        } else if (name === 'c1添加位置') {
          if (this.form.cItem.c1Item.input1 == 0 || this.form.cItem.c1Item.input1 == null) {
            this.form.cItem.c1Item.childList = []
          }
        } else if (name === 'c2添加位置') {
          if (this.form.cItem.c2Item.input1 == 0 || this.form.cItem.c2Item.input1 == null) {
            this.form.cItem.c2Item.childList = []
          }
        } else if (name === 'c3添加位置') {
          if (this.form.cItem.c3Item.input1 == 0 || this.form.cItem.c3Item.input1 == null) {
            this.form.cItem.c3Item.childList = []
          }
        }
      },
      //动态添加列表
      addList(name) {
        if (this.isLook) {
          return
        }
        let childList = {
          select1: '',
          select2: '',
          select3: '',
          select4: '',
          input1: '',
          input2: '',
          input3: '',
          input4: '',
          value: '', value2: '',
          value3: '',
          value4: '',

          url: []
        }
        if (name === 'B1添加位置') {
          this.form.bItem.b1Item.childList.push(childList)
        } else if (name === 'B2添加位置') {
          this.form.bItem.b2Item.childList.push(childList)
        } else if (name === 's1添加位置') {
          if (this.form.sItem.s1Item.childList.length + 1 < this.form.sItem.s1Item.input1 || this.form.sItem.s1Item.input1 == this.form.sItem.s1Item.childList.length + 1) {
            this.form.sItem.s1Item.childList.push(childList)
          } else if (this.form.sItem.s1Item.input1 == 0 || this.form.sItem.s1Item.input1 == null) {
            this.form.sItem.s1Item.childList = []
          }

        } else if (name === 's2添加位置') {
          if (this.form.sItem.s2Item.childList.length + 1 < this.form.sItem.s2Item.input1 || this.form.sItem.s2Item.input1 == this.form.sItem.s2Item.childList.length + 1) {
            this.form.sItem.s2Item.childList.push(childList)
          } else if (this.form.sItem.s2Item.input1 == 0 || this.form.sItem.s2Item.input1 == null) {
            this.form.sItem.s2Item.childList = []
          }

        } else if (name === 's3添加位置') {
          if (this.form.sItem.s3Item.childList.length + 1 < this.form.sItem.s3Item.input1 || this.form.sItem.s3Item.input1 == this.form.sItem.s3Item.childList.length + 1) {
            this.form.sItem.s3Item.childList.push(childList)
          } else if (this.form.sItem.s3Item.input1 == 0 || this.form.sItem.s3Item.input1 == null) {
            this.form.sItem.s3Item.childList = []
          }
        } else if (name === 'd1添加位置') {
          if (this.form.dItem.d1Item.childList.length + 1 < this.form.dItem.d1Item.input1 || this.form.dItem.d1Item.input1 == this.form.dItem.d1Item.childList.length + 1) {
            this.form.dItem.d1Item.childList.push(childList)
          } else if (this.form.dItem.d1Item.input1 == 0 || this.form.dItem.d1Item.input1 == null) {
            this.form.dItem.d1Item.childList = []
          }
        } else if (name === 'c1添加位置') {
          if (this.form.cItem.c1Item.childList.length + 1 < this.form.cItem.c1Item.input1 || this.form.cItem.c1Item.input1 == this.form.cItem.c1Item.childList.length + 1) {
            this.form.cItem.c1Item.childList.push(childList)
          } else if (this.form.cItem.c1Item.input1 == 0 || this.form.cItem.c1Item.input1 == null) {
            this.form.cItem.c1Item.childList = []
          }

        } else if (name === 'c2添加位置') {
          if (this.form.cItem.c2Item.childList.length + 1 < this.form.cItem.c2Item.input1 || this.form.cItem.c2Item.input1 == this.form.cItem.c2Item.childList.length + 1) {
            this.form.cItem.c2Item.childList.push(childList)
          } else if (this.form.cItem.c2Item.input1 == 0 || this.form.cItem.c2Item.input1 == null) {
            this.form.cItem.c2Item.childList = []
          }
        } else if (name === 'c3添加位置') {
          if (this.form.cItem.c3Item.childList.length + 1 < this.form.cItem.c3Item.input1 || this.form.cItem.c3Item.input1 == this.form.cItem.c3Item.childList.length + 1) {
            this.form.cItem.c3Item.childList.push(childList)
          } else if (this.form.cItem.c3Item.input1 == 0 || this.form.cItem.c3Item.input1 == null) {
            this.form.cItem.c3Item.childList = []
          }
        }
      },
      changeSlope() {
        this.getSlopeInfo(this.currentRow.slopeId,'technicalCheck',true)
      },
      //折叠面板
      onChangeCollapse(val, num) {
        this[`collapseActiveName1${num}`] = val
      },
      //获取路线列表
      async changeDept() {
        let list = await this.getRoadListByDept(this.currentRow.deptTreeId);
        if (this.currentRow.roadId) {
          this.changeRoad()
        } else if (list.length > 0) {
          this.$set(this.currentRow, "roadId", list[0].id);
          this.changeRoad()
        } else {
          this.$set(this.currentRow, "roadId", "");
          this.$set(this.currentRow, "slopeId", "");
        }
      },
      async getTemplate() {
        let res = await getTemplateContent({formType: 7});
        this.template = res.data;
        if (res.code == 200) {
          this.initTabActive()
        }
      },
      // 新增编辑提交数据
      async submitData() {
        this.currentRow.form = this.form
        let action = this.currentRow.id ? updateTechnicalFormNew : putTechnicalForm
        let title = this.currentRow.id ? "更新成功" : "添加成功"
        let res = await action(this.currentRow);
        if (res.code === 200) {
          this.$notify({
            type: "success",
            title: "提示",
            message: title,
          })
          this.$emit("submit");
        }

        this.isDisabled = false
      },
      // 表单校验
      validatorForm() {
        return new Promise((resolve) => {
          this.$refs.form.validate((valid) => {
            if (valid && resolve) {
              // this.isDisabled = true
              this.submitData();
            }
          });
        });
      },
      //查询灾害点列表
      async changeRoad() {
        this.slopeSelectList = [];
        const {roadId, deptTreeId} = this.currentRow;
        let list = await this.getSelectSlopeList(deptTreeId, roadId)
        if (this.currentRow.slopeId) {
          this.getSlopeInfo(this.currentRow.slopeId,'technicalCheck',true)
        } else if (list.length > 0) {
          this.$set(this.currentRow, "slopeId", list[0].id);
          this.getSlopeInfo(list[0].id,'technicalCheck',true)
        } else {
          this.$set(this.currentRow, "slopeId", "");
        }
      },
    },
    mounted() {
      this.$nextTick(() => {
        this.changeDept()
        this.form.sItem = this.form1.form.sItem
        this.form.sItem = this.form1.form.sItem
        this.form.bItem = this.form1.form.bItem
        this.form.dItem = this.form1.form.dItem
        this.form.cItem = this.form1.form.cItem
        this.form.itemList = this.form1.form.itemList
      })


      this.queryDictList(['EnumTechniqueSingleControl', 'EnumScore3', 'EnumScore4', 'EnumScore5'], ['EnumTechniqueSingleControlList', 'EnumScoreList3', 'EnumScoreList4', 'EnumScoreList5'])
    },
    activated() {
    },

  };
</script>
<style lang="less" scoped>
  .el-input__inner {
    padding: 0 !important;
    padding-left: 10px !important;
  }
</style>
<style lang="less">

  .paicha_view {
    height: 75vh;
    overflow: auto;
    padding-top: 20px;
    box-shadow: 0px 0px 4px #161616;

    .el-form-item {
      /*background: red;*/
      margin-bottom: 10px;
    }

    .el-checkbox-button.is-checked .el-checkbox-button__inner {
      background-color: #1990FE;
      border-color: #1990FE
    }

    .el-collapse .el-collapse-item__header .is-active {
      color: #fff;
    }

    .el-tabs__content {
      padding: 10px;
    }

    .el-collapse-item__header {
      border: 1px solid #1990FE;
      color: #1990FE;
    }

    .el-tabs__header {
      margin: 0;
    }

    .el-input-group__prepend {
      color: #1990FE;
      padding: 0 5px;
      background-color: transparent;
      border: none;
    }

    .el-input-group__append {
      padding: 0 5px;
      background-color: transparent;
      border: none;
    }

    .el-collapse-item__header {
      border-radius: 5px;
      margin-top: 10px;
    }

    .el-collapse-item__header.is-active {
      background-color: #1990FE;
      color: #ffffff !important;
      border-radius: 5px;
    }


    .el-tabs {
      .el-tabs__active-bar {
        background: #1990FE;

      }

      .el-tabs__item {
        color: #1990FE;
      }

      .is-active {
        color: #1990FE;

        border: none;
      }

      .el-radio-button {
        span:hover {
          color: white;
          background: #1990FE;


        }
      }
    }

    .select_card {
    }

    .el-input--suffix .el-input__inner {
      color: #1990FE;
    }

    .el-card {
      box-shadow: 4px 6px 8px #757575;
      background: #1b2733;
      box-shadow: none;
    }
  }
</style>
<style lang="less">

  .form_box {
    padding: 20px;
  }

  .s-white {
    color: #ffffff;
  }

  .el-steps--simple {
    margin-bottom: 20px;
  }

  .button-foot {
    text-align: center;

    .el-button {
      background: #1990FE;
      border: none;
    }
  }

  .select_card {
    background: #1990FE !important;
    font-size: 200%;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    /*box-shadow: 4px 6px 2px #161616 !important;*/
  }

  /deep/ .hiddenDangerFormCard {
    /*background: red !important;*/
  }

  .hover_card:hover {
    background: #1990FE !important;
  }

  // 设置 fromlabel 文字颜色


  // 设置单选框选中颜色
  .el-radio-button__orig-radio:checked + .el-radio-button__inner {
    background: #1990FE;
    border-color: #1990FE;
  }

  .paicha_view .el-card {
    border: 1px solid #1990FE !important;
  }

  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }

  .clearfix:after {
    clear: both
  }

  .box-card {
    width: 100%;
  }

  .pic-no-view {
    color: #1990FE;
    font-size: 12px;
    line-height: 30px;

  }

  .pic-no-view1 {
    color: #1990FE;
    font-size: 12px;
    background-color: #1990FE;
    line-height: 30px;

  }

  .list_view {
    .el-tabs__content {
      /*background-color: #f1f1f1;*/
      padding: 10px;
    }
  }

  .collapse_view2 {
    margin-top: 15px;

    .el-collapse-item__header {
      height: 40px;
    }

    .el-collapse .el-collapse-item__header {
      color: #069eaa;
      background-color: transparent;

    }

    .el-collapse .el-collapse-item__header.is-active {
      background-color: #179097 !important;

      color: #fff;

    }

    .el-collapse .el-collapse-item__header .is-active {
      color: #fff;
    }
  }

  .label_view {
    display: inline-block;
    color: #1990FE;
    font-weight: 600;
    text-align: right;
    line-height: 25px;
    width: 90px;
  }

  .info_view {
    text-align: left;
    margin-left: 10px;
    color: #1990FE;
  }

  .label_view2 {
    display: inline-block;
    color: #1990FE;
    font-weight: 600;
    text-align: right;
    font-size: 16px;
    line-height: 30px;
    width: 120px;
  }

  .info_view2 {
    text-align: left;
    margin-left: 10px;
    color: #f44336;
    font-size: 18px;
  }

  .tabXuHao {
    /deep/ .el-tabs--card > .el-tabs__header {
      /*border: 1px solid red !important;*/
    }

    .el-tabs__header {
      /*width: 864px !important;*/
      margin-top: 10px !important;
      margin-left: -35px;


    }
  }

  .paicha_view {
    .el-row1 {
      text-align: center;
    }

    .el-row2 {
      border: 1px solid #2ecedc;
      height: 60px;
      line-height: 60px
    }

    .el-row3 {
      width: 50%;
      display: inline-block;
      box-sizing: border-box;
      border: 1px solid #2ecedc;
      height: 80px;
      line-height: 80px;
      padding: 10px;
      padding-top: 20px;
      border-top: none;
    }

    .btnWeiZhi {
      width: 28%;
      margin-bottom: 10px;;
      background: #1990FE;
      border-radius: 20px;
      /*margin-left: 700px*/
    }

    .div3 {
      display: inline-block;
      width: 20%;
      margin-left: 15px;
    }
  }

  .tianXie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }


  #divOne {
    border-bottom: 1px solid #1990FE;
    padding-top: 10px;
  }

  .divTwo {

    border-bottom: 1px solid #1990FE;
    padding-top: 8px;
  }

  .divThree {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: red;
  }

  .danXuanBtn {
    width: 100px;

    display: flex;
    justify-content: center;
    align-items: center;
    height: 20px;


  }

  .tdDiv {
    padding: 10px 0;

  }

  .picBox {

    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    height: 100px;
    margin: auto;
  }

  .picBox1 {

    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    height: 50px;
    margin: auto;
  }

  .fillWrite {
    display: inline-block;
    width: 32%;
    text-align: left;

    height: 65px;
    line-height: 65px;

  }

  .fillWrite2 {
    border: none;
  }

  .picTd {
    width: 150px;
    /*background: yellow;*/
  }

  .radioTd {
    width: 150px;
  }


  /*  修改调查单位一行input样式*/
  .investigationBox {
    .el-input__inner {
      padding-left: 30px !important;
    }

    .el-col {

      box-sizing: border-box;

      .investigationTwoBox {
        width: 100%;

        overflow: hidden;

        .el-form-item__label {
          width: 100px !important;
        }

        .el-form-item__content {
          margin-left: 0px !important;
        }
      }
    }

  }

</style>
<style scoped lang="less">
  /deep/ .el-tabs__item {
    font-size: 24px !important;
  }

  /*  table*/
  table {
    width: 100%;
    /*margin-top: 10px;*/

    tr {
      border: 1px solid #1990FE;

      th {
        align-items: center;
        line-height: 34px;
        height: 34px;
        font-size: 14px;
        color: white;
        background: #1990FE;
        border-left: 1px solid white;

      }

      .lastTh {
        border-left: none;
      }

      td {
        min-width: 50px;
        align-items: center;
        display: table-cell;
        vertical-align: middle;
        border: 1px solid #1990FE;
        text-align: center;
        box-sizing: border-box;
        /*padding: 10px 0;*/
        valign: middle;
        align: center;
        height: 40px;
        line-height: 40px;


        /deep/ .el-input__inner {
          border: none;
          border-bottom: 1px solid #1990FE;
          border-radius: 0;


        }

      }
    }

    .tableHeader {
      border: 1px solid #1990FE
    }
  }

  .el-divider--horizontal {
    margin: 30px 0;
  }

  .tips {
    font-size: 20px;
    color: #ffbf00;
    margin-right: 5px;
    cursor: pointer;
  }

  .bItemBox {
    .el-form-item {
      margin-top: 1vw;
      width: 50%;
      display: inline-block;
    }

  }
  .el-image__error, .el-image__inner, .el-image__placeholder {

  }
  .tableBox tr td /deep/.el-input__inner{
    padding: 0 !important;
    text-align: center;
  }
</style>

